<script setup>
import { debounceRef } from '@/utils/common/debounceRef'
import { ref, reactive } from 'vue'
const a = debounceRef(2, 1000)
</script>

<template>
  <div class="debounce-wrapper">
    <div class="add" @click="a++">+</div>
    <div class="content">{{ a }}</div>
    <div class="sub" @click="a--">-</div>
  </div>
</template>

<style lang="scss" scoped>
.debounce-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  div {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    border: 1px solid #ccc;
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    margin: 15px;
    cursor: pointer;
    &:active {
      background-color: #ccc;
    }
  }
}
</style>
